<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            /* width: 500px; */
        }
        /*         
        div {
            width: 300px;
            width: 50%;
            height: 300px;
            background-color: palegreen;
        } */
        
        .box {
            width: 500px;
            height: 400px;
            background-color: palegreen;
        }
        
        .box1 {
            width: 30%;
            height: 300px;
            background-color: palevioletred;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="box1">

        </div>
    </div>

</body>

</html>